package day13;

public class InstanceTest {

}

class Person{
	protected String name = "person";
	protected int age = 50;
	
	public String getInfo(){
		return "Name:"+name+"\nage:"+age;
	}
}

class Student extends Person{
	protected String school = "pku";
	
	@Override
	public String getInfo() {
		return "Name:"+name +"\nage:"+age+"\nschool:"+school;
	}
}

class Graduate extends Student{
	public String major = "IT";
	@Override
	public String getInfo() {
		return "Name:"+name +"\nage:"+age+"\nschool:"+school+"\nmajor:"+major;
	}
}

